package com.database;

import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Properties;

public class DataBaseConnection 
{
private Connection connection=null;
private Properties properties=null;
private FileInputStream fileInputStream=null;
private String userName=null;
private String password=null;
public Connection CallConnection()
{
	try
	{
	properties=new Properties();
	fileInputStream=new FileInputStream("system.properties");
	properties.load(fileInputStream);
	userName=properties.getProperty("root");
	password=properties.getProperty("root");
	 Class.forName("com.mysql.jdbc.Driver");
	 connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/onwireless", "root", "root");
	
	}
	catch(Exception e)
	{
		e.printStackTrace();
	}
	return connection;
}
}
